package com.hnevc.xiewanguang;

/**
 *
 *
 * String类
 */
public class Example01 {
    public static void main(String[] args) {
        //创建字符串
        String str = "abc";
        String str1 = new String();
        String str2 = new String("abc");
        char[] chars = new char[]{'D','E','F'};
        //将字符放入字符数组中
        String str3 = new String(chars);
        //字符串数组
        System.out.println(str);
        System.out.println(str1);
        System.out.println(str2);
        System.out.println(str3);
    }

}
